package org.jeecg.modules.demo.member.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: jk_member_info
 * @Author: jeecg-boot
 * @Date:   2025-05-18
 * @Version: V1.0
 */
@Data
@TableName("jk_member_info")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description="jk_member_info")
public class JkMemberInfo implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "id")
    private Integer id;
	/**会员编号*/
	@Excel(name = "会员编号", width = 15)
    @Schema(description = "会员编号")
    private String username;
	/**会员密码*/
	@Excel(name = "会员密码", width = 15)
    @Schema(description = "会员密码")
    private String password;
	/**用户姓名*/
	@Excel(name = "用户姓名", width = 15)
    @Schema(description = "用户姓名")
    private String realname;
	/**昵称*/
	@Excel(name = "昵称", width = 15)
    @Schema(description = "昵称")
    private String nickname;
	/**性别*/
	@Excel(name = "性别", width = 15, dicCode = "sex")
	@Dict(dicCode = "sex")
    @Schema(description = "性别")
    private String gender;
	/**生日*/
	@Excel(name = "生日", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @Schema(description = "生日")
    private Date birthday;
	/**头像URL*/
	@Excel(name = "头像URL", width = 15)
    @Schema(description = "头像URL")
    private String avatarUrl;
	/**手机号*/
	@Excel(name = "手机号", width = 15)
    @Schema(description = "手机号")
    private String phone;
	/**邮箱*/
	@Excel(name = "邮箱", width = 15)
    @Schema(description = "邮箱")
    private String email;
	/**地址*/
	@Excel(name = "地址", width = 15)
    @Schema(description = "地址")
    private String address;
	/**工作单位*/
	@Excel(name = "工作单位", width = 15)
    @Schema(description = "工作单位")
    private String workunit;
	/**所属省*/
    @Excel(name = "所属省", width = 15,exportConvert=true,importConvert = true )
    @Schema(description = "所属省")
    private String province;

    public String convertisProvince() {
        return SpringContextUtils.getBean(ProvinceCityArea.class).getText(province);
    }

    public void convertsetProvince(String text) {
        this.province = SpringContextUtils.getBean(ProvinceCityArea.class).getCode(text);
    }
	/**所在城市*/
	@Excel(name = "所在城市", width = 15)
    @Schema(description = "所在城市")
    private String city;
	/**简介*/
	@Excel(name = "简介", width = 15)
    @Schema(description = "简介")
    private String memberDesc;
	/**偏好*/
	@Excel(name = "偏好", width = 15)
    @Schema(description = "偏好")
    private String preference;
	/**积分*/
	@Excel(name = "积分", width = 15)
    @Schema(description = "积分")
    private Integer memberScore;
	/**会员类别*/
	@Excel(name = "会员类别", width = 15, dicCode = "member_type")
    @Schema(description = "会员类别")
    @Dict(dicCode = "member_type")
    private String memberType;
	/**介绍人*/
	@Excel(name = "介绍人", width = 15)
    @Schema(description = "介绍人")
    private String introducer;
	/**启用状态*/
    @Excel(name = "启用状态", width = 15,replace = {"是_Y","否_N"} )
    @Schema(description = "启用状态")
    private String isEnabled;
	/**注册时间*/
	@Excel(name = "注册时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "注册时间")
    private Date registerTime;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private Date createTime;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间")
    private Date updateTime;
	/**创建人*/
    @Schema(description = "创建人")
    private String createBy;
	/**更新人*/
    @Schema(description = "更新人")
    private String updateBy;
    /**随机盐*/
    @Schema(description = "随机盐")
    private String salt;

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getWorkunit() {
        return workunit;
    }

    public void setWorkunit(String workunit) {
        this.workunit = workunit;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getMemberDesc() {
        return memberDesc;
    }

    public void setMemberDesc(String memberDesc) {
        this.memberDesc = memberDesc;
    }

    public String getPreference() {
        return preference;
    }

    public void setPreference(String preference) {
        this.preference = preference;
    }

    public Integer getMemberScore() {
        return memberScore;
    }

    public void setMemberScore(Integer memberScore) {
        this.memberScore = memberScore;
    }

    public String getMemberType() {
        return memberType;
    }

    public void setMemberType(String memberType) {
        this.memberType = memberType;
    }

    public String getIntroducer() {
        return introducer;
    }

    public void setIntroducer(String introducer) {
        this.introducer = introducer;
    }

    public String getIsEnabled() {
        return isEnabled;
    }

    public void setIsEnabled(String isEnabled) {
        this.isEnabled = isEnabled;
    }

    public Date getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }
}
